<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0"/>
    <title>商品列表</title>
    <link type="image/x-icon" rel="shortcut icon" href="images/favicon.ico">
    <link rel="stylesheet" href="assets/mui/css/mui.css"/>
    <link rel="stylesheet" href="assets/fa/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="css/common.css"/>
    <link rel="stylesheet" href="css/searchList.css"/>
</head>
<body>
<div class="lt_container">
    <header class="lt_topBar">
        <a class="btn_left" href="javascript:history.back();"><span class="mui-icon mui-icon-arrowleft"></span></a>
        <h3>商品列表</h3>
    </header>
    <div class="lt_content">
        <div class="lt_wrapper">
            <div class="mui-scroll-wrapper">
                <div class="mui-scroll">
                    <!--搜索表单-->
                    <div class="lt_search">
                        <form action="javascript:;">
                            <input class="search_input" type="search" placeholder="请输入搜索关键字"/>
                            <a class="search_btn" href="javascript:;">搜索</a>
                        </form>
                    </div>
                    <!--搜索排序-->
                    <div class="lt_order">
                        <a href="javascript:;">上架时间<span class="fa fa-angle-down"></span></a>
                        <a data-type="price" href="javascript:;">价格<span class="fa fa-angle-down"></span></a>
                        <a data-type="num" href="javascript:;">库存<span class="fa fa-angle-down"></span></a>
                        <a href="javascript:;">折扣<span class="fa fa-angle-down"></span></a>
                    </div>
                    <!--搜索列表-->
                    <div class="lt_product">
                        <div class="loading"><span class="mui-icon mui-icon-spinner"></span></div>
                        <!--初始页面有loading效果 加载数据之后动态渲染-->
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer class="lt_tabBar">
        <ul>
            <li><a href="index.html"><span class="fa fa-home"></span><p>首页</p></a></li>
            <li><a href="category.html"><span class="fa fa-bars"></span><p>分类</p></a></li>
            <li><a href="user/cart.html"><span class="fa fa-shopping-cart"></span><p>购物车</p></a></li>
            <li><a href="user/index.html"><span class="fa fa-user"></span><p>会员中心</p></a></li>
        </ul>
    </footer>
</div>
<script type="text/template" id="productTpl">
    <% for(var i = 0 ; i < data.length ; i++){ %>
    <% var item = data[i]; %>
    <a class="item" href="product.html?productId=<%=item.id%>">
        <%
            var pic = item.pic,src = '';
            if( pic && pic.length ){
                src =   pic[0].picAddr || '';
            }
        %>
        <img src="<%=src%>" onerror="this.src='images/none.png'" alt=""/>
        <span class="mui-ellipsis-2 mui-text-left"><%=item.proName%></span>
        <p><span>&yen;<%=item.price%></span> <span>&yen;<%=item.oldPrice%></span></p>
        <button class="mui-btn-blue">立即购买</button>
    </a>
    <% } %>
</script>
<script src="assets/mui/js/mui.js"></script>
<script src="assets/zepto/zepto.min.js"></script>
<script src="assets/artTemplate/template-native.js"></script>
<script src="js/common.js"></script>
<script src="js/searchList.js"></script>
</body>
</html>